<?php
/**
 * Class to set meta data (title, description, keywords).Singleton 
 * 
 * @author Konstantin Shamko <konstantin.shamko@gmail.com> 
 * @version 0.0.1
 * @copyright  Copyright (c) 2009 Konstantin Shamko
 * @category VaselinEngine
 * @package Bel Classes
 * @license  New BSD License
 *
 */
class Bel_Seo{	
	/**
	 * Page titles
	 *
	 * @var array
	 */
	private $_title;
	/**
	 * Pages descriptions
	 *
	 * @var array
	 */
	private $_description;
	/**
	 * Page keywords
	 *
	 * @var array
	 */
	private $_keywords;
	/**
	 * Class instance for Singleton
	 *
	 * @var $this
	 */	
	private static $_instance;
	/**
	 * Singleton realization. Call this to get instance of this class
	 *
	 * @return Bel_Seo
	 */
	static public function getInstance(){
		if (null === self::$_instance) {
			self::$_instance = new self();
		}
		return self::$_instance;
	}
	/**
	 * Set page title
	 *
	 * @param string $string
	 * @return void
	 */
	public function setTitle($string){
		$this->_title = $string;
	}
	/**
	 * Set page description
	 *
	 * @param string $string
	 * @return void
	 */
	public function setDescription($string){
		$this->_description = $string;
	}
	/**
	 * Set page keywords
	 *
	 * @param string $string
	 * @return void
	 */
	public function setKeywords($string){
		$this->_keywords = $string;
	}
	/**
	 * Return titles
	 *
	 * @return array
	 */
	public function getTitle(){
		return $this->_title;
	}
	/**
	 * Return description
	 *
	 * @return array
	 */
	public function getDescription(){
		return $this->_description;
	}
	/**
	 * Return keywords
	 *
	 * @return array
	 */
	public function getKeywords(){
		return $this->_keywords;
	}	
	/**
	 * Returns full metadata (title, keyword. description)
	 *
	 * @return array
	 */
	public function getSeo(){
		return array('title'=>$this->getTitle(),'keywords'=>$this->getKeywords(),'description'=>$this->getDescription());
	}
}